/*
 * @Description: 输出二维数组
 * 
 * @Author: rendc
 * 
 * @Date: 2025-07-25 14:55:52
 * 
 * @LastEditors: rendc
 * 
 * @LastEditTime: 2025-07-25 15:05:01
 */

import java.util.Arrays;

public class Test03 {

  public static void main(String[] args) {
    // int[][] arr = { { 1, 2, 3 }, { 1, 2 } };
    // int[][] arr = {};
    int[][] arr = null;
    print2DArray(arr);
  }

  public static void print2DArray(int[][] arr) {
    if (arr == null) {
      System.out.println("null");
      return;
    }
    if (arr.length == 0) {
      System.out.println("[]");
      return;
    }
    System.out.print("[");
    for (int i = 0; i < arr.length; i++) {
      System.out.print(Arrays.toString(arr[i]));
      if (i < (arr.length - 1)) {
        System.out.print(",");
      }
    }
    System.out.print("]");
  }

}